<template>
    <select v-model="localSelectedModel" @change="$emit('update:selectedModel', localSelectedModel)">
      <option value="GPT-3">GPT-3</option>
      <option value="GPT-4">GPT-4</option>
      <option value="Davinci">Davinci</option>
    </select>
  </template>
  
  <script setup lang="ts">
  import { defineProps, defineEmits, computed } from 'vue';
  
  const props = defineProps<{
    selectedModel: string;
  }>();
  
  const emit = defineEmits<{
    (e: 'update:selectedModel', value: string): void;
  }>();
  
  const localSelectedModel = computed({
    get: () => props.selectedModel,
    set: (value) => emit('update:selectedModel', value),
  });
  </script>